package cn.java86.test;

import cn.java86.dao.GradeDao;
import cn.java86.dao.StudentDao;
import cn.java86.entity.Grade;
import cn.java86.entity.Student;
import cn.java86.util.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * @author oldliu
 * @since 1.0
 */
public class QueryGrade {
    public static void main(String[] args) {
        SqlSession s= MybatisUtil.get();
        GradeDao gradeDao = s.getMapper(GradeDao.class);
        List<Grade> list = gradeDao.getAll();
        for(Grade g:list){
            System.out.println(g);
        }
        MybatisUtil.close(s);
    }
}
